Optimal. Leaf size=128 \[ \frac {3 d^3 \text {Li}_3\left (-e^{2 i (a+b x)}\right )}{2 b^4}-\frac {3 i d^2 (c+d x) \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{b^3}+\frac {3 d (c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b^2}+\frac {(c+d x)^3 \tan (a+b x)}{b}-\frac {i (c+d x)^3}{b}-\frac {(c+d x)^4}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.21, antiderivative size = 128, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.438, Rules used = {3720, 3719, 2190, 2531, 2282, 6589, 32} \[ -\frac {3 i d^2 (c+d x) \text {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^3}+\frac {3 d^3 \text {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{2 b^4}+\frac {3 d (c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b^2}+\frac {(c+d x)^3 \tan (a+b x)}{b}-\frac {i (c+d x)^3}{b}-\frac {(c+d x)^4}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 32
Rule 2190
Rule 2282
Rule 2531
Rule 3719
Rule 3720
Rule 6589
Rubi steps
\begin {align*} \int (c+d x)^3 \tan ^2(a+b x) \, dx &=\frac {(c+d x)^3 \tan (a+b x)}{b}-\frac {(3 d) \int (c+d x)^2 \tan (a+b x) \, dx}{b}-\int (c+d x)^3 \, dx\\ &=-\frac {i (c+d x)^3}{b}-\frac {(c+d x)^4}{4 d}+\frac {(c+d x)^3 \tan (a+b x)}{b}+\frac {(6 i d) \int \frac {e^{2 i (a+b x)} (c+d x)^2}{1+e^{2 i (a+b x)}} \, dx}{b}\\ &=-\frac {i (c+d x)^3}{b}-\frac {(c+d x)^4}{4 d}+\frac {3 d (c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b^2}+\frac {(c+d x)^3 \tan (a+b x)}{b}-\frac {\left (6 d^2\right ) \int (c+d x) \log \left (1+e^{2 i (a+b x)}\right ) \, dx}{b^2}\\ &=-\frac {i (c+d x)^3}{b}-\frac {(c+d x)^4}{4 d}+\frac {3 d (c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b^2}-\frac {3 i d^2 (c+d x) \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{b^3}+\frac {(c+d x)^3 \tan (a+b x)}{b}+\frac {\left (3 i d^3\right ) \int \text {Li}_2\left (-e^{2 i (a+b x)}\right ) \, dx}{b^3}\\ &=-\frac {i (c+d x)^3}{b}-\frac {(c+d x)^4}{4 d}+\frac {3 d (c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b^2}-\frac {3 i d^2 (c+d x) \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{b^3}+\frac {(c+d x)^3 \tan (a+b x)}{b}+\frac {\left (3 d^3\right ) \operatorname {Subst}\left (\int \frac {\text {Li}_2(-x)}{x} \, dx,x,e^{2 i (a+b x)}\right )}{2 b^4}\\ &=-\frac {i (c+d x)^3}{b}-\frac {(c+d x)^4}{4 d}+\frac {3 d (c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b^2}-\frac {3 i d^2 (c+d x) \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{b^3}+\frac {3 d^3 \text {Li}_3\left (-e^{2 i (a+b x)}\right )}{2 b^4}+\frac {(c+d x)^3 \tan (a+b x)}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 6.55, size = 424, normalized size = 3.31 \[ \frac {3 c^2 d \sec (a) (b x \sin (a)+\cos (a) \log (\cos (a) \cos (b x)-\sin (a) \sin (b x)))}{b^2 \left (\sin ^2(a)+\cos ^2(a)\right )}+\frac {i e^{-i a} d^3 \sec (a) \left (2 b^2 x^2 \left (2 b x-3 i \left (1+e^{2 i a}\right ) \log \left (1+e^{-2 i (a+b x)}\right )\right )+6 \left (1+e^{2 i a}\right ) b x \text {Li}_2\left (-e^{-2 i (a+b x)}\right )-3 i \left (1+e^{2 i a}\right ) \text {Li}_3\left (-e^{-2 i (a+b x)}\right )\right )}{4 b^4}+\frac {3 c d^2 \csc (a) \sec (a) \left (b^2 x^2 e^{-i \tan ^{-1}(\cot (a))}-\frac {\cot (a) \left (i \text {Li}_2\left (e^{2 i \left (b x-\tan ^{-1}(\cot (a))\right )}\right )+i b x \left (-2 \tan ^{-1}(\cot (a))-\pi \right )-2 \left (b x-\tan ^{-1}(\cot (a))\right ) \log \left (1-e^{2 i \left (b x-\tan ^{-1}(\cot (a))\right )}\right )-2 \tan ^{-1}(\cot (a)) \log \left (\sin \left (b x-\tan ^{-1}(\cot (a))\right )\right )-\pi \log \left (1+e^{-2 i b x}\right )+\pi \log (\cos (b x))\right )}{\sqrt {\cot ^2(a)+1}}\right )}{b^3 \sqrt {\csc ^2(a) \left (\sin ^2(a)+\cos ^2(a)\right )}}+\frac {\sec (a) \sec (a+b x) \left (c^3 \sin (b x)+3 c^2 d x \sin (b x)+3 c d^2 x^2 \sin (b x)+d^3 x^3 \sin (b x)\right )}{b}-\frac {1}{4} x \left (4 c^3+6 c^2 d x+4 c d^2 x^2+d^3 x^3\right ) \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [C] time = 0.46, size = 373, normalized size = 2.91 \[ -\frac {b^{4} d^{3} x^{4} + 4 \, b^{4} c d^{2} x^{3} + 6 \, b^{4} c^{2} d x^{2} + 4 \, b^{4} c^{3} x - 3 \, d^{3} {\rm polylog}\left (3, \frac {\tan \left (b x + a\right )^{2} + 2 i \, \tan \left (b x + a\right ) - 1}{\tan \left (b x + a\right )^{2} + 1}\right ) - 3 \, d^{3} {\rm polylog}\left (3, \frac {\tan \left (b x + a\right )^{2} - 2 i \, \tan \left (b x + a\right ) - 1}{\tan \left (b x + a\right )^{2} + 1}\right ) - {\left (6 i \, b d^{3} x + 6 i \, b c d^{2}\right )} {\rm Li}_2\left (\frac {2 \, {\left (i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1} + 1\right ) - {\left (-6 i \, b d^{3} x - 6 i \, b c d^{2}\right )} {\rm Li}_2\left (\frac {2 \, {\left (-i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1} + 1\right ) - 6 \, {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + b^{2} c^{2} d\right )} \log \left (-\frac {2 \, {\left (i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1}\right ) - 6 \, {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + b^{2} c^{2} d\right )} \log \left (-\frac {2 \, {\left (-i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1}\right ) - 4 \, {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x + b^{3} c^{3}\right )} \tan \left (b x + a\right )}{4 \, b^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (d x + c\right )}^{3} \tan \left (b x + a\right )^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.13, size = 348, normalized size = 2.72 \[ -\frac {d^{3} x^{4}}{4}-c \,d^{2} x^{3}-\frac {3 c^{2} d \,x^{2}}{2}-c^{3} x -\frac {6 i d^{2} c \,a^{2}}{b^{3}}+\frac {3 d \,c^{2} \ln \left (1+{\mathrm e}^{2 i \left (b x +a \right )}\right )}{b^{2}}-\frac {6 d \,c^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {6 d^{3} a^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{4}}-\frac {6 i d^{2} c \,x^{2}}{b}+\frac {6 i d^{3} a^{2} x}{b^{3}}+\frac {2 i \left (d^{3} x^{3}+3 c \,d^{2} x^{2}+3 c^{2} d x +c^{3}\right )}{b \left (1+{\mathrm e}^{2 i \left (b x +a \right )}\right )}+\frac {3 d^{3} \ln \left (1+{\mathrm e}^{2 i \left (b x +a \right )}\right ) x^{2}}{b^{2}}+\frac {4 i d^{3} a^{3}}{b^{4}}+\frac {3 d^{3} \polylog \left (3, -{\mathrm e}^{2 i \left (b x +a \right )}\right )}{2 b^{4}}+\frac {12 d^{2} c a \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}-\frac {3 i d^{2} c \polylog \left (2, -{\mathrm e}^{2 i \left (b x +a \right )}\right )}{b^{3}}-\frac {3 i d^{3} \polylog \left (2, -{\mathrm e}^{2 i \left (b x +a \right )}\right ) x}{b^{3}}-\frac {2 i d^{3} x^{3}}{b}+\frac {6 d^{2} c \ln \left (1+{\mathrm e}^{2 i \left (b x +a \right )}\right ) x}{b^{2}}-\frac {12 i d^{2} c a x}{b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.63, size = 1363, normalized size = 10.65 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\mathrm {tan}\left (a+b\,x\right )}^2\,{\left (c+d\,x\right )}^3 \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (c + d x\right )^{3} \tan ^{2}{\left (a + b x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________